package EvaTCPL;

public class EvaTCPLedist extends EvaTCPLaexpression
{

  public EvaTCPLedist(EvaTCPLaexpression e1)
    {
      super(e1);
    }

  /** Evaluate this arithmetic expression. */
  public double evaluate()
    {
      double x;
      x = Math.random();
      while (x==0 || x==1) {
        x = Math.random();
      }

      return -((Math.log(1-x))/sons[0].evaluate());
    }

  public String toString()
    {
      return "edist("+sons[0].toString()+")";
    }

}
